GXGetStyleCap
You can use theGXGetStyleCap
function to retrieve the cap information from a style object.
gxCapRecord *GXGetStyleCap(gxStyle source, gxCapRecord *cap);
source
- The style object whose cap information you want to retrieve.
cap
- A pointer to a
gxCapRecord
structure. On return, this structure contains the cap information for the source style object.- function result
- A copy of the
gxCapRecord
associated with the source style.DESCRIPTION
TheGXGetStyleCap
function returns as its function result, and in thecap
parameter, agxCapRecord
structure containing the cap information for the style object specified by thesource
parameter.This function creates new shapes to encapsulate the start cap and end cap geometries, and places references to these shapes in the
startCap
andendCap
fields of the returnedgxCapRecord
structure. You should dispose of these shapes when you no longer need them.Since this function copies the cap information from the source style object, you may make changes to the
gxCapRecord
structure returned by this function without affecting the source style's cap information. If you want to change the cap information in the source style, you must use theGXSetStyleCap
function.SPECIAL CONSIDERATIONS
If no error results, theGXGetStyleCap
function creates shapes; you are responsible for disposing of these shapes when you no longer need them. See Inside Macintosh: QuickDraw GX Objects for information about disposing QuickDraw GX objects.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory style_is_nil parameter_is_nil (debugging version) SEE ALSO
For a discussion of start and end caps, see "Caps" on page 3-23.For examples of adding caps to a shape, see "Adding Caps to a Shape" on page 3-57 and "Adding Standard Caps to a Shape" on page 3-59.
For a discussion of the
gxCapRecord
structure and a description of what types of shapes you can use as cap shapes, see "The Cap Structure" on page 3-99.To specify cap information for a style object, use the
GXSetStyleCap
function, which is described in the next section.To retrieve cap information from a style object associated with a particular shape, use the
GXGetShapeCap
function, which is described on page 3-126. To specify cap information for a style object associated with a particular shape, use theGXSetShapeCap
function, which is described on page 3-128.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help